package main

import "fmt"

//声明布尔型变量
var isStupid bool

//声明数值型变量
var age int
var rmb float32

//复数
var vector complex64 = 3 + 4i

//声明字符串变量
var name string

//声明复合型变量
//10长度的整形变量
var ages [10]int

//可变长的整形切片
var heights []int

//映射
var info map[string]float32 = map[string]float32{"资产": 100000, "负债": 100000000}

//结构体
var zhangquandan struct {
	name string
	age  int
	rmb  float32
}

var weight int = 300

//整形指针
var weightPointer *int = &weight

//声明函数变量
var add func()

func main() {
	/*
		fmt.Printf格式化打印
		%T 类型占位符
		%v 值占位符
	*/
	fmt.Printf("isStupid的类型是%T,值是%v\n", isStupid, isStupid)
	fmt.Printf("age的类型是%T,值是%v\n", age, age)
	fmt.Printf("rmb的类型是%T,值是%v\n", rmb, rmb)
	fmt.Printf("name的类型是%T,值是%v\n", name, name)
	fmt.Printf("vector的类型是%T,值是%v\n", vector, vector)
	fmt.Printf("name的类型是%T,值是%v\n", name, name)
	fmt.Printf("ages的类型是%T,值是%v\n", ages, ages)
	fmt.Printf("heights的类型是%T,值是%v\n", heights, heights)
	fmt.Printf("info的类型是%T,值是%v\n", info, info)
	fmt.Printf("zhangquandan的类型是%T,值是%v\n", zhangquandan, zhangquandan)
	fmt.Printf("weightPointer的类型是%T,值是%v\n", weightPointer, weightPointer)
	fmt.Printf("add的类型是%T,值是%v\n", add, add)

}
